package cz.mendelu.swi2.documents;


import java.util.ArrayList;
import java.util.List;
import java.util.Vector;

public class ListOfDocuments {
	private List<Dokument> documentsList =  new ArrayList<Dokument>();
	
	public List<Dokument> getList(){
		return documentsList;
	}
	
	public boolean newDocument(Dokument doc){
		documentsList.add(doc);
		return true;
	}
	
	public boolean removeDocument(String name){
		int pocet = documentsList.size();
		for(int a = 0; a < pocet; a++){
			if(documentsList.get(a).getName() == name){
				documentsList.remove(a);
			}
		}
		
		return true;
	}
}
